package com.atguigu.eduservice.controller;

/*
 * @ClassName EduLoginController
 * @author  忘忧君
 * @Description
 * @Version 1.0
 */

import com.atguigu.commonutils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@Api(description="用户登录管理")
@RestController
@RequestMapping("/eduservice/user")
// @CrossOrigin
public class EduLoginController {

    @ApiOperation(value = "用户登录", notes = "弃用 已交由security统一处理")
    @PostMapping("login")
    public R login(){
        return R.ok().data("token", "admin");
    }

    @ApiOperation(value = "用户信息详情", notes = "弃用 已交由security统一处理")
    @GetMapping("info")
    public R info(){
        return R.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://online-teach-file.oss-cn-beijing.aliyuncs.com/teacher/2019/10/30/b8aa36a2-db50-4eca-a6e3-cc6e608355e0.png");
    }
}
